import Events from '@/model/Events';

class EventController {
  // 添加新的事件
  async addEvent(ctx) {
    const { body } = ctx.request;

    const newEvent = new Events(body);
    const save = await newEvent.save();

    ctx.body = {
      code: 200,
      msg: '新增成功',
    };
  }
}

export default new EventController();
